//
//  MoreViewController.m
//  OpenYourEyes
//
//  Created by 沈振烨 on 15/8/19.
//  Copyright (c) 2015年 zhanglei. All rights reserved.
//

#import "MoreViewController.h"
#import "UserViewController.h"
#import "MovieViewController.h"
#import "ReportViewController.h"

@interface MoreViewController ()
@property (nonatomic, strong) UIButton *userProtocolButton;  //  用户协议button
@property (nonatomic, strong) UIButton *movieFunctionButton;  //  视频功能声明button
@property (nonatomic, strong) UIButton *coprReportButton;  //  版权声明button



@end

@implementation MoreViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    self.navigationItem.title = @"更多";
    [self createButton];
}

- (void)createButton
{
    _userProtocolButton = [UIButton buttonWithType:UIButtonTypeCustom];
    _userProtocolButton.frame = CGRectMake(0, 50, self.view.frame.size.width, 100);
    [_userProtocolButton setTitle:@"用户协议" forState:UIControlStateNormal];
    [_userProtocolButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    [self.view addSubview:_userProtocolButton];
    
    _movieFunctionButton = [UIButton buttonWithType:UIButtonTypeCustom];
    _movieFunctionButton.frame = CGRectMake(0, 150, self.view.frame.size.width, 100);
    [_movieFunctionButton setTitle:@"视频功能声明" forState:UIControlStateNormal];
    [_movieFunctionButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    [self.view addSubview:_movieFunctionButton];
    
    _coprReportButton = [UIButton buttonWithType:UIButtonTypeCustom];
    _coprReportButton.frame = CGRectMake(0, 250, self.view.frame.size.width, 100);
    [_coprReportButton setTitle:@"版权声明" forState:UIControlStateNormal];
    [_coprReportButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    [self.view addSubview:_coprReportButton];
    
    [_userProtocolButton addTarget:self action:@selector(doTapToUserProtocol:) forControlEvents:UIControlEventTouchUpInside];
    [_movieFunctionButton addTarget:self action:@selector(doTapToMovieFunction:) forControlEvents:UIControlEventTouchUpInside];
    [_coprReportButton addTarget:self action:@selector(doTapToCoprReport:) forControlEvents:UIControlEventTouchUpInside];
    
}

- (void)doTapToUserProtocol:(UIButton *)sender
{
    UserViewController *userVC = [[UserViewController alloc] init];
    [self.navigationController pushViewController:userVC animated:YES];
}

- (void)doTapToMovieFunction:(UIButton *)sender
{
    MovieViewController *movieVC = [[MovieViewController alloc] init];
    [self.navigationController pushViewController:movieVC animated:YES];
}

- (void)doTapToCoprReport:(UIButton *)sender
{
    ReportViewController *reportVC = [[ReportViewController alloc] init];
    [self.navigationController pushViewController:reportVC animated:YES];
}
- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
}

@end
